<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 模板消息行业表
 */
class CreateWxTemplatemsgIndustry extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_templatemsg_industrys', function (Blueprint $table) {
            $table->increments('industry_id')->comment('行业ID');
            $table->string('main_industry', 40)->default('')->comment('主行业');
            $table->string('sub_industry', 50)->default('')->comment('副行业');
            $table->softDeletes();
            $table->timestamps();
            $table->index(['sub_industry','main_industry'], 'index1');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_templatemsg_industrys');
    }
}
